perm filename FIX[AM,DBL] blob
sn#462853 filedate 1979-07-26 generic text, type T, neo UTF8
(FILECREATED " 1-Oct-78 13:02:41" <LENAT>FIX.;2 1418
changes to: FIXFNS
previous date: " 1-Oct-78 13:00:31" <LENAT>FIX.;1)
(PRETTYCOMPRINT FIXCOMS)
(RPAQQ FIXCOMS ((FNS * FIXFNS)))
(RPAQQ FIXFNS (GETFIELD))
(DEFINEQ
(GETFIELD
[LAMBDA (FIELD SLOT UNIT)
(CLISP: FAST)
(* GETFIELD returns the value for a given field in a given slot in a given unit. If the operation can not be
completed (eg. slot doesn't exist, or unit doesn't exist, or field is invalid, GETFIELD simply returns NIL
after an appropriate error message.))
(if (AND (EQ UNIT UA.NAME)
SLOT=UA.SLOTNAME)
or (SLOT? SLOT UNIT)
then (if UA.SLOTREF:SLOT.ROLE MEMB '(NC S)
then (SLOT? SLOT UA.SLOTREF:SLOT.DATATYPE))
(* For directly inherited and unchanged slots, reset the current unit to track back to the appropriate
ancestor.)
(* For regular slots, simply return a copy of the field.)
(SELECTQ FIELD
(VALUE UA.SLOTREF:SLOT.VALUE)
(ROLE UA.SLOTREF:SLOT.ROLE)
(DATATYPE UA.SLOTREF:SLOT.DATATYPE)
(DEFAULT UA.SLOTREF:SLOT.DEFAULT)
(CDR (FASSOC FIELD UA.SLOTREF:SLOT.FIELDS)))
else
(* Distinguish between errors -
no UNIT or no SLOT.)
(if (UNIT? UNIT)
then (UA-ERRMSG 20 SLOT)
else (UA-ERRMSG 10 UNIT])
)
(DECLARE: DONTCOPY
(FILEMAP (NIL (239 1394 (GETFIELD 251 . 1391)))))
STOP